const express = require('express')
const router = express.Router()

const toJson = (data) => {
    return JSON.stringify(data)
}

// router.get('/system/dict/data/type/sys_show_hide', (req, res) => {
//     const body = {
//         "msg": "操作成功",
//         "code": 200,
//         "token": "1234567890"
//     }
//     res.send(toJson(body))
// })
router.get('/system/post/list', (req, res) => {
    const body = {
        "total": 4,
        "rows": [
            {
                "createBy": "admin",
                "createTime": "2024-06-30 11:27:12",
                "updateBy": null,
                "updateTime": null,
                "remark": "",
                "postId": 1,
                "postCode": "ceo",
                "postName": "董事长",
                "postSort": 1,
                "status": "0",
                "flag": false
            },
            {
                "createBy": "admin",
                "createTime": "2024-06-30 11:27:12",
                "updateBy": null,
                "updateTime": null,
                "remark": "",
                "postId": 2,
                "postCode": "se",
                "postName": "项目经理",
                "postSort": 2,
                "status": "0",
                "flag": false
            },
            {
                "createBy": "admin",
                "createTime": "2024-06-30 11:27:12",
                "updateBy": null,
                "updateTime": null,
                "remark": "",
                "postId": 3,
                "postCode": "hr",
                "postName": "人力资源",
                "postSort": 3,
                "status": "0",
                "flag": false
            },
            {
                "createBy": "admin",
                "createTime": "2024-06-30 11:27:12",
                "updateBy": null,
                "updateTime": null,
                "remark": "",
                "postId": 4,
                "postCode": "user",
                "postName": "普通员工",
                "postSort": 4,
                "status": "0",
                "flag": false
            }
        ],
        "code": 200,
        "msg": "查询成功"
    }
    res.send(toJson(body))
})


module.exports = router